const { get_fst_file, get_full_path } = require("../utils/file_tool");
const { BaseCommand } = require("./base");

class WriteExcelCommand extends BaseCommand {
    async execute() {
        const dst = get_full_path(this.selfData.dst);
        /**
         * @type {Excel.Workbook}
         */
        const workbook = this.selfData.content;
        await workbook.xlsx.writeFile(dst);
    }
}

module.exports = {
    WriteExcelCommand,
};
